package com.google.code.stalkernet.peer.event;

import java.util.EventListener;

/**
 * Receives notifications about peer-related events.
 *
 * @author Mikhail Vladimirov
 */
public interface PeerListener extends EventListener
{
    /**
     * Called when message was received from the peer.
     *
     * @param peerEvent event details
     */
    public void messageReceived (PeerEvent peerEvent);

    /**
     * Called when peer was disconnected.
     *
     * @param peerEvent event details
     */
    public void disconnected (PeerEvent peerEvent);
}
